package main

import (
	"fmt"
	"os"
	"os/signal"
	"syscall"
	"unsafe"
)

func main() {
	fmt.Println("run...")
	var server Server
	server.startServer("127.0.0.1", 1116)
	var info ForwardInfo
	size := unsafe.Sizeof(info)
	fmt.Println("大小: ", size)
	var shutdownSignals = []os.Signal{os.Interrupt, syscall.SIGTERM}
	c := make(chan os.Signal)
	signal.Notify(c, shutdownSignals...)

	for {
		s := <-c
		fmt.Println("get signal:", s)
		server.stopServer()
		return
	}

}
